<link rel="stylesheet" href="css/style.css" type="text/css" />
<?php 

    $configfile = '/etc/opt/fbc/fbc.xml';
    $xml = simplexml_load_file($configfile);

    foreach ( $xml->server as $server )
    {
        if ($server->type == "po") {
            $pos[] = $server->name;
        }
        if ($server->type == "domain"){
            $doms[] = $server->name;
        }
    }
?>
<ul id="css3menu1" class="topmenu">
	<li class="topfirst"<a href="index.php" title="Home" style="height:18px;line-height:18px;"><span>Home</span></a>

	<li class="topmenu"><a href="#" title="Settings" style="height:18px;line-height:18px;"><span>Settings</span></a>
	<ul>
		<li class="subfirst"><a href="globalsettings.php" title="Main Settings">Main Settings</a></li>
		<?php foreach ($doms as $dom)
		{
		echo "<li class='subfirst'><a href='objectsettings.php?name=".$dom."' title='".$dom."'>".$dom." Domain Settings</a></li>";
	}
			?>

		<li>
		<?php foreach ($pos as $po)
        {
        echo "<li class='subfirst'><a href='objectsettings.php?name=".$po."' title='".$po."'>".$po." Post Office Settings</a></li>";
        }
        ?>
		</li>
	</ul>
	</li>

	<li clases="topmenu"><a href="" title="New Object" style="height:18px;line-height:18px;"><span>Add GW Object</span></a>
		<ul>
			<li class="subfirst"><a href="newobject.php?type=domain" title="New Domain">Add Domain</a></li>
		 	<li class="subfirst"><a href="newobject.php?type=po" title="New PO">Add Post Office</a></li>
		</ul>
	
	</li>
 <li class="topmenu"><a href="#" title="Status" style="height:18px;line-height:18px;"><span>Status</span></a>
    <ul>
        <li class="subfirst"><a href="objectstatus.php?name=global" title="Main Settings">Main Status</a></li>

        
       <?php foreach ($doms as $dom)
       {
            echo "<li class='subfirst'><a href='objectstatus.php?name=".$dom."' title='".$dom."'>".$dom." Domain Status</a></li>";
       }
        

       foreach ($pos as $po)

       {
            echo "<li class='subfirst'><a href='objectstatus.php?name=".$po."' title='".$po."'>".$po." Post Office Status</a></li>";
       }
       ?>
    </ul>
    </li>



	<li class="toplast"><a href="" title="Recovery" style="height:18px;line-height:18px;">Recovery</a>

	    <ul>
        <?php foreach ($doms as $dom)
        {
        echo "<li class='subfirst'><a href='recovery.php?name=".$dom."' title='".$dom."'>".$dom." Domain Recovery</a></li>";
    }
            ?>

        <li>
        <?php foreach ($pos as $po)
        {
        echo "<li class='subfirst'><a href='recovery.php?name=".$po."' title='".$po."'>".$po." Post Office Recovery</a></li>";
        }
        ?>
    	</ul>

	</li>



</ul>


